/* 
 * File:   SwitchCurrentStackCommand.h
 * Author: Gab'z
 *
 * Created on 5 juin 2012, 02:38
 */

#ifndef SWITCHCURRENTSTACKCOMMAND_H
#define	SWITCHCURRENTSTACKCOMMAND_H

#include "StackListCommand.h"

namespace calculator {

    class SwitchCurrentStackCommand : public StackListCommand {
        friend class CommandMap;

    public:
        virtual ~SwitchCurrentStackCommand();

        std::string isExecutable() const;
        virtual SwitchCurrentStackCommand* clone() const;

        const Memento* createMemento() const throw (CommandException);
        void restoreFromMemento(const Memento* memento) const throw (MementoException);

    protected:

    private:
        void apply(StackList* stacklist) const throw (CommandException);

        SwitchCurrentStackCommand(const std::string name);
        SwitchCurrentStackCommand(const SwitchCurrentStackCommand& orig);
    };

}

#endif	/* SWITCHCURRENTSTACKCOMMAND_H */

